﻿/***************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    This code is licensed under the Visual Studio 
    Visualization and Modeling SDK license terms.

    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
***************************************************************************/
#pragma warning disable 1570
namespace Microsoft.VisualStudio.ArchitectureTools.CodeRepositoryQuery
{
    /// <summary>
    /// A type signature argument represents recursive type signatures, type variables, and generic arguments
    /// </summary>
    /// <example>
    /// <code>
    ///   (i) List&lg;Dictionary&lg;int, double&gt;&gt; is a ClassOrInterface with one type signature argument with an ItemType of
    ///       Dictionary&lg;int, double&gt; 
    ///  (ii) Dictionary&lg;int, double&gt; in turn is a ClassOrInterface with two type signature arguments:
    ///         GenericParameterIndex:0, ItemType:int
    ///         GenericParameterIndex:1, ItemType:double
    /// (iii) int[][] is an SZArray with an ItemType of int[]
    ///  (iv) List&lg;double&gt;* is a Pointer an ItemType of List&lg;double&gt;
    ///   (v) List&lg;int&gt;.Enumerator has a ContainingTypeSignature of List&lg;int&gt;
    ///  (vi) The return type signature of "MyMethod" in the following code block has a single type signature argument
    ///       with GenericTypeParameter referring to the type parameter "T" in the class "X"
    ///           class X&lg;T&gt; where T : new() {
    ///               T MyMethod() { return new T(); }
    ///           }
    ///  </code>
    /// </example>
    partial class TypeSignatureArgument
    {
        /// <summary>
        /// Provides a strongly typed access to the Kind of the Type signature argument
        /// Note that we keep <see cref="P:TypeSignatureArgumentKindAsByte"/> so that it can be used in entity framework queries filtering
        /// on the type signature Kind (because entity framework does not handle enums yet)
        /// </summary>
        public TypeSignatureArgumentKind TypeSignatureArgumentKind
        {
            get
            {
                return (TypeSignatureArgumentKind)this.TypeSignatureArgumentKindAsByte;
            }
        }
    }
}
